﻿namespace Visitor
{
    internal abstract class Entry : IElement
    {
        public abstract string GetName();
        public abstract int GetSize();

        public Entry Add(Entry entry)
        {
            throw new FileTreatmentException();
        }

        public IEnumerator<Entry> GetEnumerator() 
        {
            throw new FileTreatmentException();
        }

        public override string ToString()
        {
            return $"{this.GetName()} ({this.GetSize()})";
        }

        public abstract void Accept(VisitorAbstract visitor);
    }
}
